#include <iostream>
#include <string>
#include "tyrion.h"


int main() {

    PF f  = functionPointer;

    functionPointerTest(f);

    return 0;
}


void changeValue(Student s) {
    s.name = "tyrion_1";
    s.age = 1;
    throw 54;
}

void changeValueWithRef(Student &s) {
    s.name = "tyrion_2";
    s.age = 2;
}

void changeValueWithPoint(Student *s) {
    s->name = "tyrion_3";
    s->age = 3;
}

int functionPointer(int a) {
    std::cout << a << " " << std::endl;
    return a;
}

int functionPointerTest(PF pf) {
    return pf(1);
}

int *pointerFunction(int *a) {
    int b = *a + 1;
    std::cout << a << " " << &a << " " << b << " " << &b << std::endl;
    int *c = &b;
    return c;
}